require "util"
require "logUtil"

-- 皇宫UI
function hg_ui()
  
  local x, y = findMultiColorInRegionFuzzy(0xf2e599,"2|-13|0xfefdc1,-27|7|0x3d0504,-25|22|0x470605,-22|35|0x3d0503,-10|44|0xe3b621,15|42|0xd5a624,26|32|0x420b0a,-3|31|0x2d0504,16|10|0x410806,42|12|0x50120f,55|7|0x3e0e0a,61|-11|0x0a0302,73|11|0xddcb71,87|35|0xd7ae39,73|30|0xa1742a,53|37|0x330e0b,106|19|0x32110d,111|4|0x351610", 80, 0, 0, 1079, 1919, 0, 0)
  if x > -1 then
   
  end
end 

-- 请安
function hg_qingAn()
 local  x, y = findMultiColorInRegionFuzzy(0x874117,"62|-28|0xc26b2e,82|21|0x6e3c1c,-64|23|0x835023,-78|-27|0xbf662b,31|-4|0x7f614d,27|7|0xbba78d,-8|2|0xf2e8c8,11|11|0x7f614e,-26|-4|0x9a501f,-14|-9|0xfff7d6,-14|5|0xfbf2d2,7|10|0xfff7d6,27|10|0xede2c2,25|-5|0xfff7d6,9|-7|0xf3e9c9", 80, 0, 0, 1079, 1919, 0, 0)
  if x > -1 then
     click(x,y )
  end
end 

-- 退朝
function hg_tuiChao()
 local x, y = findMultiColorInRegionFuzzy(0xf26617,"12|-1|0xf36e17,-55|-17|0xfef4d1,-102|-21|0xf7efd5,-113|-21|0xfef7dc,-120|-18|0x310a00,-95|0|0xfeeaa4,-59|9|0x310a00,-62|-28|0xfefaec,-40|-18|0xe5dcbf", 80, 0, 0, 1079, 1919, 0, 0)
  if x > -1 then
      click(x,y )
  end
end 






-------------------------- 皇宫逻辑
function hg_run()
-- 请安
logger("开始请安！",LOG_DEBUG)
hg_qingAn();

logger("准备退出皇宫！",LOG_DEBUG)
hg_tuiChao();
logger("退出皇宫！",LOG_DEBUG)
end 

